package com.example.valuation.adapterr;

import android.graphics.Color;
import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.valuation.R;

import java.util.HashMap;

/**
 * 支数适配器
 */
public class ZhiShuAdapter extends BaseQuickAdapter<HashMap<String, String>, BaseViewHolder> {
    public ZhiShuAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder helper, HashMap<String, String> item) {
        helper.setText(R.id.text1, item.get("text1"));
        helper.setText(R.id.text2, item.get("text2"));
        helper.setText(R.id.text3, item.get("text3"));
        if (helper.getAdapterPosition() == 5) {
            View view = helper.getView(R.id.line1);
            view.setBackgroundColor(Color.YELLOW);
        }
    }
}
